<h1>Listing events</h1>

<table>
  <tr>
    <th>Patient</th>
    <th>Month</th>
    <th>Time</th>
    <th>Agent</th>
    <th>Location</th>
    <th>Event type</th>
  </tr>
  
<% for event in @events %>
  <tr>
    <td><%=h event.patient %></td>
    <td><%=h event.month %></td>
    <td><%=h event.time %></td>
    <td><%=h event.agent_id %></td>
    <td><%=h event.location %></td>
    <td><%=h event.event_type_id %></td>
    <td><%= link_to 'Show', event_path(event) %></td>
    <td><%= link_to 'Edit', edit_event_path(event) %></td>
    <td><%= link_to 'Destroy', event_path(event), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New event', new_event_path %>